package test0ne;

public class Child implements Cloneable {

    private String name;

    private String age;

    private Parent parent;

    public Child(String name, String age, Parent parent) {
        this.name = name;
        this.age = age;
        this.parent = parent;
    }

    public Parent getParent() {
        return parent;
    }

    public void setParent(Parent parent) {
        this.parent = parent;
    }

    public String getName() {
        return this.name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Child clone() {
        Child c = null;
        try {
            c =  (Child)super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return c;
    }

}
